package com.example.football.controller;

import com.example.football.pojo.People;
import com.example.football.pojo.Peoplelikestar;
import com.example.football.pojo.Peopleliketeam;
import com.example.football.pojo.Result;
import com.example.football.service.PeopleServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AppPeopleController {

    @Autowired
    private PeopleServiceImpl userService;

    /**
     * 注册
     * @param people
     * @return
     */
    @PostMapping("/APPregister")
    public Result register(@RequestBody People people){
        return userService.rgister(people);
    }

    @PostMapping("/APPlogin")
    public Result login(@RequestBody People people){
        return userService.login(people);
    }

    @PostMapping("/APPpeopleliketeam")
    public Result peopleliketeam(@RequestBody People id){
        return userService.showPeopleliketeam(id);
    }

    @PostMapping("/APPpeoplelikestar")
    public Result peoplelikestar(@RequestBody People id){
        return userService.showPeoplelikestar(id);
    }

    @PostMapping("/APPdeletepeopleliketeam")
    public Result deletepeopleliketeam(@RequestBody Peopleliketeam id){
        return userService.deletePeopleliketeam(id);
    }

    @PostMapping("/APPinsertpeopleliketeam")
    public Result insertpeopleliketeam(@RequestBody Peopleliketeam id){
        return userService.insertPeopleliketeam(id);
    }

    @PostMapping("/APPdeletepeoplelikestar")
    public Result deletepeoplelikestar(@RequestBody Peoplelikestar id){
        return userService.deletePeoplelikestar(id);
    }

    @PostMapping("/APPinsertpeoplelikestar")
    public Result insertpeoplelikestar(@RequestBody Peoplelikestar id){
        return userService.insertPeoplelikestar(id);
    }

    @PostMapping("/APPupdatepeople")
    public Result updatepeople(@RequestBody People people){ return userService.updatepeople(people);}
}
